from __future__ import division
from jinja2.runtime import LoopContext, TemplateReference, Macro, Markup, TemplateRuntimeError, missing, concat, escape, markup_join, unicode_join, to_string, TemplateNotFound
name = '/loginform.html'

def root(context, environment=environment):
    parent_template = None
    if 0: yield None
    parent_template = environment.get_template('base.html', '/loginform.html')
    for name, parent_block in parent_template.blocks.iteritems():
        context.blocks.setdefault(name, []).append(parent_block)
    for event in parent_template.root_render_func(context):
        yield event

def block_content(context, environment=environment):
    l_message = context.resolve('message')
    l_url_for = context.resolve('url_for')
    l__ = context.resolve('_')
    l_form = context.resolve('form')
    t_1 = environment.filters['safe']
    if 0: yield None
    yield u'\n    <div id="message">\n      %s\n    </div>\n    <div id="loginform">\n      ' % (
        escape(l_message), 
    )
    def macro():
        t_2 = []
        l_form = context.resolve('form')
        l__ = context.resolve('_')
        pass
        t_2.extend((
            u'\n      <fieldset>\n        <legend>', 
            escape(context.call(l__, 'Kay Login Form')), 
            u'</legend>\n        ', 
        ))
        l_field = missing
        for l_field in l_form:
            pass
            t_2.extend((
                u'\n        <p>\n          ', 
                escape(t_1(context.call(environment.getattr(l_field, 'errors')))), 
                u'\n          ', 
                escape(t_1(context.call(environment.getattr(l_field, 'label')))), 
                u'\n          ', 
                escape(t_1(context.call(environment.getattr(l_field, 'render')))), 
                u'\n        </p>\n        ', 
            ))
        l_field = missing
        t_2.extend((
            u'\n        ', 
            escape(t_1(context.call(environment.getattr(l_form, 'default_actions'), label=context.call(l__, 'Login')))), 
            u'\n      </fieldset>\n      ', 
        ))
        return Markup(concat(t_2))
    caller = Macro(environment, macro, None, (), (), False, False, False)
    yield context.call(l_form, caller=caller)
    yield u'\n    </div>\n    <a href="%s">%s</a>\n' % (
        escape(context.call(l_url_for, 'auth/request_reset_password')), 
        escape(context.call(l__, 'Forgot password?')), 
    )

def block_bodytag(context, environment=environment):
    if 0: yield None
    yield u'<body onload="document.forms[0].user_name.focus();">'

def block_title(context, environment=environment):
    l__ = context.resolve('_')
    if 0: yield None
    yield escape(context.call(l__, 'Kay Login'))

blocks = {'content': block_content, 'bodytag': block_bodytag, 'title': block_title}
debug_info = '1=8&4=14&6=22&9=24&11=31&12=35&14=39&15=41&16=43&18=47&19=49&9=54&21=55&23=56&3=60&2=64'